package co.com.smart.persistence.entity.dto;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;


/**
 * The persistent class for the smart_afiliacion database table.
 * 
 */
@Entity
@Table(name="smart_afiliacion")
@NamedQuery(name="SmartAfiliacion.findAll", query="SELECT s FROM SmartAfiliacion s")
public class SmartAfiliacion implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@Column(name="sm_scafiliacion")
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private BigDecimal smScafiliacion;

	@Column(name="sm_coafiliacion")
	private String smCoafiliacion;

	@Column(name="sm_cousuario")
	private String smCousuario;

	@Column(name="sm_dsafiliacion")
	private String smDsafiliacion;

	@Temporal(TemporalType.DATE)
	@Column(name="sm_fhingreso")
	private Date smFhingreso;

	@Temporal(TemporalType.DATE)
	@Column(name="sm_fhmodificacion")
	private Date smFhmodificacion;

	@Temporal(TemporalType.DATE)
	@Column(name="sm_fhretiro")
	private Date smFhretiro;

	//bi-directional many-to-one association to SmartDatosMaestro
	@ManyToOne(optional = false, fetch = FetchType.LAZY)
	@JoinColumn(name="sm_sctipoafiliacion", referencedColumnName="sm_scdatosmaestros")
	private SmartDatosMaestro smartDatosMaestro1;

	//bi-directional many-to-one association to SmartDatosMaestro
	@ManyToOne(optional = false, fetch = FetchType.LAZY)
	@JoinColumn(name="sm_scnivel", referencedColumnName="sm_scdatosmaestros")
	private SmartDatosMaestro smartDatosMaestro2;

	//bi-directional many-to-one association to SmartDatosMaestro
	@ManyToOne(optional = false, fetch = FetchType.LAZY)
	@JoinColumn(name="sm_scplan",  referencedColumnName="sm_scdatosmaestros")
	private SmartDatosMaestro smartDatosMaestro3;

	//bi-directional many-to-one association to SmartEp
	@ManyToOne(optional = false, fetch = FetchType.LAZY)
	@JoinColumn(name="sm_sceps",referencedColumnName="sm_sceps")
	private SmartEps smartEps;

	//bi-directional many-to-one association to SmartPaciente
	@ManyToOne(optional = false, fetch = FetchType.LAZY)
	@JoinColumn(name="sm_scpaciente", referencedColumnName="sm_scpaciente")
	private SmartPaciente smartPaciente;

	public SmartAfiliacion() {
	}

	public BigDecimal getSmScafiliacion() {
		return this.smScafiliacion;
	}

	public void setSmScafiliacion(BigDecimal smScafiliacion) {
		this.smScafiliacion = smScafiliacion;
	}

	public String getSmCoafiliacion() {
		return this.smCoafiliacion;
	}

	public void setSmCoafiliacion(String smCoafiliacion) {
		this.smCoafiliacion = smCoafiliacion;
	}

	public String getSmCousuario() {
		return this.smCousuario;
	}

	public void setSmCousuario(String smCousuario) {
		this.smCousuario = smCousuario;
	}

	public String getSmDsafiliacion() {
		return this.smDsafiliacion;
	}

	public void setSmDsafiliacion(String smDsafiliacion) {
		this.smDsafiliacion = smDsafiliacion;
	}

	public Date getSmFhingreso() {
		return this.smFhingreso;
	}

	public void setSmFhingreso(Date smFhingreso) {
		this.smFhingreso = smFhingreso;
	}

	public Date getSmFhmodificacion() {
		return this.smFhmodificacion;
	}

	public void setSmFhmodificacion(Date smFhmodificacion) {
		this.smFhmodificacion = smFhmodificacion;
	}

	public Date getSmFhretiro() {
		return this.smFhretiro;
	}

	public void setSmFhretiro(Date smFhretiro) {
		this.smFhretiro = smFhretiro;
	}

	public SmartDatosMaestro getSmartDatosMaestro1() {
		return this.smartDatosMaestro1;
	}

	public void setSmartDatosMaestro1(SmartDatosMaestro smartDatosMaestro1) {
		this.smartDatosMaestro1 = smartDatosMaestro1;
	}

	public SmartDatosMaestro getSmartDatosMaestro2() {
		return this.smartDatosMaestro2;
	}

	public void setSmartDatosMaestro2(SmartDatosMaestro smartDatosMaestro2) {
		this.smartDatosMaestro2 = smartDatosMaestro2;
	}

	public SmartDatosMaestro getSmartDatosMaestro3() {
		return this.smartDatosMaestro3;
	}

	public void setSmartDatosMaestro3(SmartDatosMaestro smartDatosMaestro3) {
		this.smartDatosMaestro3 = smartDatosMaestro3;
	}

	public SmartEps getSmartEps() {
		return this.smartEps;
	}

	public void setSmartEps(SmartEps smartEps) {
		this.smartEps = smartEps;
	}

	public SmartPaciente getSmartPaciente() {
		return this.smartPaciente;
	}

	public void setSmartPaciente(SmartPaciente smartPaciente) {
		this.smartPaciente = smartPaciente;
	}

}